/*
ID: icerupt1
PROG: humble
LANG: C++11
*/

/* solution
 *
 * good problem.每次直接产生第i个数，从当前所有素数指向的数乘以该素数
 * 取最小值就能得到。
 *
*/
#include <fstream>
#include <iostream>
#include <vector>

std::ifstream fin {"humble.in" };
std::ofstream fout{"humble.out"};

std::vector<signed int> prime;
std::vector<signed int> ans;
std::vector<int> factor_p;
int n, k;

int main()
{
	fin >> k >> n;
	prime.resize(k);
	factor_p.resize(k);
	ans.resize(n+1);
	ans[0] = 1;
	for (int i = 0; i < k; i++) fin >> prime[i];

	for (int i = 1; i <= n; i++) {
		signed int min = ans[factor_p[0]] * prime[0];
		for (int j = 1; j < k; j++) {
			if (min > ans[factor_p[j]] * prime[j]) {
				min = ans[factor_p[j]] * prime[j];
			}
		}
		ans[i] = min;
		for (int j = 0; j < k; j++)
			if (min == ans[factor_p[j]] * prime[j])
				factor_p[j]++;
	}

	std::cout << ans[n] << '\n';
	fout << ans[n] << '\n';
}

